package com.xuecheng.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.api.content.model.dto.TeachplanDTO;
import com.xuecheng.api.content.model.dto.TeachplanMediaDTO;
import com.xuecheng.api.content.model.dto.TeachplanWorkDTO;
import com.xuecheng.content.entity.Teachplan;

/**
 * <p>
 * 课程计划 服务类
 * </p>
 *
 * @author itcast
 * @since 2021-03-31
 */
public interface TeachplanService extends IService<Teachplan> {

    /**
     * <p>
     * 查询课程计划树状结构集合
     * </p>
     *
     * @param
     * @return TeachplanNode
     */
    TeachplanDTO queryTreeNodes(Long courseId, Long companyId);

    /**
     * <p>
     * 修改或添加课程计划
     * </p>
     *
     * @param teachplanDTO 传入的课程计划信息
     * @param companyId    机构id
     * @return TeachplanDTO
     */
    TeachplanDTO createOrModifyTeachPlan(TeachplanDTO teachplanDTO, Long companyId);

    /**
     * <p>
     * 删除课程计划
     * </p>
     *
     * @param teachPlanId 课程计划id
     * @param companyId   机构id
     * @return boolean
     */
    boolean deleteTeachPlan(Long teachPlanId, Long companyId);

    /**
     * <p>
     * 创建或修改课程计划绑定媒资
     * </p>
     *
     * @param teachplanMediaVO 传入的mediaId teachplanId封装
     * @param companyId        机构id
     * @return TeachplanMediaDTO
     */
    TeachplanMediaDTO createOrModifyTeachplanMedia(TeachplanMediaDTO teachplanMediaVO, Long companyId);

    /**
     * <p>
     * 创建或修改课程计划绑定作业
     * </p>
     *
     * @param teachplanWorkDTO 传入的作业绑定课程计划封装
     * @param companyId        机构id
     * @return TeachplanWorkDTO
     */
    TeachplanWorkDTO createOrModifyTeachplanWork(TeachplanWorkDTO teachplanWorkDTO, Long companyId);


    /**
     * <p>
     * 删除课程计划绑定作业
     * </p>
     *
     * @param teachplanWorkId id
     * @param companyId       机构id
     */
    void removeTeachplanWork(Long teachplanWorkId, Long courseBaseId, Long companyId);


    /**
     * <p>
     * 删除课程计划和媒资的绑定
     * </p>
     *
     * @param teachplanMediaId 媒资绑定id
     * @param courseBaseId     课程id
     * @param companyId        机构id
     */
    void removeTeachplanMedia(Long teachplanMediaId, Long courseBaseId, Long companyId);
}
